<#include "/macro.include"/>
<#include "/java_copyright.include">
<#assign className = table.className>
<#assign classNameLower = className?uncap_first>
package ${basepackage}.service;

import ${basepackage}.mapper.${className}Mapper;
import ${basepackage}.model.${className};
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
<#include "/java_imports.include">

public interface ${className}Service{



	/**  
     *   
     * <save one>  
     * @param ${classNameLower}  
     * @return ${table.pkColumn.simpleJavaType}
     */ 
	int insert(${className} ${classNameLower});

	 /**  
     *   
     * <update one>  
     * @param ${classNameLower}  
     * @throws
     */ 
	 int update(${className} ${classNameLower});

	 /**  
     *   
     * <find one by id>  
     * @param id  
     * @return ${className}
     */ 
	 ${className} get(${table.idColumn.simpleJavaType} id);

	/**  
     * <query all>  
     * @param paramMap  
     * @param pageBounds
     * @return List<${className}>
     */ 
	 List<${className}> search(Map paramMap ,PageBounds pageBounds);
	
	<#list table.columns as column>
	<#if column.unique && !column.pk>
	/**  
     *   
     * <find one by ${column.columnName}>  
     * @param id  
     * @return ${className}
     */ 
	 ${className} getBy${column.columnName}(${column.simpleJavaType} ${column.columnNameFirstLower});
	</#if>
	</#list>
}